<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Room Information</title>
</head>

<body bgcolor="#CCCCCC">
<br>
<table width="800" height="494" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <th height="62" colspan="2" style=" background-color:#F90" scope="col"><font color="#FFFFFF">Exam Room Management<font></th>
  </tr>
  <tr>
    <th width="190" height="427" scope="row" style="background-color:#F90" > <div align="center"><b><font color="#FFFFFF">Menu<font><br><br>
      <center xmlns="http://www.w3.org/1999/xhtml">
		<!-- <br/><input type="button" onClick="window.location.href='http://127.0.0.1:8000/room/add/{{ room.roomID }}/'" value="Add Info"><br />
		<br/><input type="button" onClick="window.location.href='http://127.0.0.1:8000/room/edit/{{ room.roomID }}/'" value="Edit"><br />
		<br/><input type="button" onClick="window.location.href='http://127.0.0.1:8000/room/deleting/{{ room.roomID }}/'" value="Delete"><br /> -->
		<br/><input type="button" onClick="window.location.href='http://127.0.0.1:8000/admin/'" value="Back">
		</center></td>
		</center>
    </div>
    </th>
    <td width="610" style="background-color:#FFF"> <center>
		<h3>Room Information</h3><br>
{% if errors %}
	        <ul>
	            {% for error in errors %}
	            	<p style="color: red;">{{ error }}</p>
	            {% endfor %}
	        </ul>
		{% endif %}		
		<form action="/room/" method="get">    	
    	<table class="myTable">
        <tr><th>Room ID</th><th>Date/Month/Year</th><th>Time</th><th>Subject</th><th>Action</th></tr>
        {% for room in rooms %}        	
        	<tr><td>{{ room.roomID }}</td><td><center>{{ room.date }}</center></td><td><center>{{ room.time }}</center></td><td>{{ room.subj }}</td><td><center><input type="button" onClick="window.location.href='http://127.0.0.1:8000/room/{{ room.roomID }}/{{ room.date }}/{{ room.time }}/{{ room.subj }}'" value="View Info"></center></td></tr>
        {% endfor %}        
        <tr><td><input type="text" maxlength="10" name="id" style="width:100px"></td>
        <td>
        	<select name="day">
				<option value="1" selected>1</option>
				{% for d in days %}					
					<option value="{{ d }}">{{ d }}</option>
				{% endfor %}
			</select>
			<select name="month">
				<option value="1" selected>1</option>
				{% for m in months %}					
					<option value="{{ m }}">{{ m }}</option>
				{% endfor %}
			</select>
			<select name="year">
				<option value="2012" selected>2012</option>					
			</select>
        </td>
        <td>
        	<select name="time">
				<option value="9:00-12:00" selected>9:00-12:00</option>
				<option value="13:00-15:00">13:00-15:00</option>
				<option value="13:00-16:00">13:00-16:00</option>
			</select>
        </td>
        <td>
        	{% if subjs %}
        	<select name="subj">				
				{% for subj in subjs %}					
					<option value="{{ subj.subjName }}">{{ subj.subjName }}</option>
				{% endfor %}
			</select>
			{% endif %}
        </td>
        <td><center><input type="submit" value="Add"></center></td></tr>
        </table></center>
        </form>	    
		</center></td></tr>
		</table>      
<br>
<br>
<br>
</body>
</html>

